/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;

/**
 *
 * @author Dao Thai Duy
 */
@Entity
public abstract class ReservationEntity implements Serializable {
    private static long serialVersionUID = 1L;

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public static void setSerialVersionUID(long aSerialVersionUID) {
        serialVersionUID = aSerialVersionUID;
    }
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    private String status;
    private String confirmation;
    private double deposit;
    private String specialRequest;
    private boolean paid;
    @ManyToOne
    private TouristAccountEntity tourist;
    @OneToMany(mappedBy="reservation")
    private List<TransactionsEntity> transactions= new ArrayList<TransactionsEntity>();
    @OneToMany(mappedBy="reservation")
    private List<ReservationPaymentItemEntity> reservationPaymentItem= new ArrayList<ReservationPaymentItemEntity>();
    @ManyToOne
    private BranchEntity branch;
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getConfirmation() {
        return confirmation;
    }

    public void setConfirmation(String confirmation) {
        this.confirmation = confirmation;
    }

    public double getDeposit() {
        return deposit;
    }

    public void setDeposit(double deposit) {
        this.deposit = deposit;
    }

    public String getSpecialRequest() {
        return specialRequest;
    }

    public void setSpecialRequest(String specialRequest) {
        this.specialRequest = specialRequest;
    }

    public boolean isPaid() {
        return paid;
    }

    public void setPaid(boolean paid) {
        this.paid = paid;
    }

    public TouristAccountEntity getTourist() {
        return tourist;
    }

    public void setTourist(TouristAccountEntity tourist) {
        this.tourist = tourist;
    }

    public List<TransactionsEntity> getTransactions() {
        return transactions;
    }

    public void setTransaction(ArrayList<TransactionsEntity> transactions) {
        this.transactions = transactions;
    }

    public List<ReservationPaymentItemEntity> getReservationPaymentItem() {
        return reservationPaymentItem;
    }

    public void setReservationPaymentItem(ArrayList<ReservationPaymentItemEntity> reservationPaymentItem) {
        this.reservationPaymentItem = reservationPaymentItem;
    }

    public BranchEntity getBranch() {
        return branch;
    }

    public void setBranch(BranchEntity branch) {
        this.branch = branch;
    }    
}
